package com.deductive.domain.assumed;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.deductive.common.config.mybatis.GeoJsonToGeometryDeserializer;
import com.deductive.common.config.mybatis.GeometryToGeoJsonSerializer;
import com.deductive.common.config.mybatis.GeometryTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.locationtech.jts.geom.Geometry;

/**
 * 想定信息基础表
 * @TableName assumed_basic
 */
@ApiModel(value = "AssumedBasic", description = "想定信息")
@TableName(value ="assumed_basic")
@Data
public class AssumedBasic implements Serializable {
    /**
     * id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /**
     * 想定名称
     */
    @ApiModelProperty(value = "想定名称")
    @TableField(value = "scenario_name")
    private String scenarioName;

    /**
     * 想定描述
     */
    @ApiModelProperty(value = "想定描述")
    @TableField(value = "scenario_description")
    private String scenarioDescription;

    /**
     * 想定背景
     */
    @ApiModelProperty(value = "想定背景")
    @TableField(value = "scenario_background")
    private String scenarioBackground;

    /**
     * 区域备注
     */
    @ApiModelProperty(value = "区域描述")
    @TableField(value = "remark")
    private String remark;

    /**
     * 空间几何数据
     */
    @ApiModelProperty(value = "空间几何数据")
    @TableField(value = "geom", typeHandler = GeometryTypeHandler.class)
    @JsonSerialize(using = GeometryToGeoJsonSerializer.class)
    @JsonDeserialize(using = GeoJsonToGeometryDeserializer.class)
    private Geometry geom;

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "想定开始时间")
    @TableField(value = "start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "想定结束时间")
    @TableField(value = "end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date Time;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 场景标识
     */
    @ApiModelProperty(value = "场景标识")
    @TableField(value = "scenario_id")
    private Long scenarioId;


    /**
     * 关联文件ID，逗号分隔存储多个 sys_files.id
     */
    @ApiModelProperty(value = "关联文件ID，逗号分隔存储多个 sys_files.id")
    @TableField(value = "file_ids")
    private String fileIds;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}